<!-- 企业信息详情 -->
<template>
  <div class="detail-index-content">
    <div class="page-main-content">
      <div class="page-main-content-head">
        <BtnBox isIcon type="light-blue" text="已通过" />
        <BtnText type="primary">更新时间 {{formData.createDateTime}}</BtnText>
      </div>
      <h3>企业基本信息</h3>
      <div class="page-main-form-box">
        <Row>
          <Col span="8">
            <MainFormItem title="企业名称">{{
              formData.companyName
            }}</MainFormItem>
          </Col>
          <Col span="8"
            ><MainFormItem title="上级组织">{{
              formData.parentName
            }}</MainFormItem></Col
          >
          <Col span="8"
            ><MainFormItem title="证件类型">{{
              formData.companyCardTypeName
            }}</MainFormItem></Col
          >
          <Col span="8"
            ><MainFormItem title="证件号码">{{
              formData.companyCardNumber
            }}</MainFormItem></Col
          >
          <Col span="8"
            ><MainFormItem title="注册地址">{{
              formData.companyAddress
            }}</MainFormItem></Col
          >
          <Col span="8"
            ><MainFormItem title="证件照片">
              <ViewImg
                isPreview
                isIcon
                errorMsg="证件照片"
                :fileList="formData.companyIdFiles"
              ></ViewImg> </MainFormItem
          ></Col>
          <Col span="24"
            ><MainFormItem title="业务范围">{{
              formData.businessRange
            }}</MainFormItem></Col
          >
        </Row>
      </div>
      <Divider />
      <h3>企业服务能力</h3>
      <div class="page-main-form-box">
        <Row>
          <Col span="24"
            ><MainFormItem title="服务地区">{{
              formData.serviceArea.map((o) => o.serviceAreaName).join(",")
            }}</MainFormItem></Col
          >
          <Col span="24"
            ><MainFormItem title="产业标记">{{
              formData.serviceType.map((o) => o.serviceTypeName).join(",")
            }}</MainFormItem></Col
          >
        </Row>
      </div>
      <Divider />
      <h3>企业资质</h3>
      <div class="page-main-form-box page-main-form-table">
        <Table :columns="columns" :data="listData">
          <template slot-scope="{ row }" slot="file">
            <ViewImg></ViewImg>
          </template>
        </Table>
      </div>
    </div>
  </div>
</template>

<script type="text/javascript">
import {
  GetCompanyChangeHistoryData, // 变更前后数据
} from "@/api/enterpriseInforManage.js";

export default {
  name: "enterpriseInforInquiry",
  components: {},
  data() {
    return {
      formData: {
        auditStatus: "",
        auditStatusName: "",
        baseStatus: "",
        baseStatusName: "",
        businessLicenseImages: "",
        city: "",
        companyAddress: "",
        companyCardNumber: "",
        companyCardTypeName: "",
        companyCnSimpleName: "",
        companyCode: "",
        companyEnSimpleName: "",
        companyId: "",
        companyIdFiles: [],
        companyItems: [],
        companyLevel: "",
        companyLevelName: "",
        companyName: "",
        companyRuleFiles: [],
        contactMobile: "",
        contactPerson: "",
        createDateTime: "",
        createUserName: "",
        district: "",
        isDel: false,
        logoUrl: "",
        parentId: "",
        province: "",
        rootId: "",
        ruleStatus: "",
        ruleStatusName: "",
        serviceArea: [],
        serviceType: [],
        companyAptitudeFiles: [],
        status: "",
        statusName: "",
        street: "",
        updateDateTime: "",
        updateUserName: "",
      },
      columns: [
        {
          title: "资质名称",
          key: "name",
        },
        {
          title: "等级",
          key: "age",
        },
        {
          title: "资质附件",
          slot: "file",
        },
        {
          title: "有效期截止时间",
          key: "address",
        },
      ],
      columnsRecord: [
        {
          title: "项目名称",
          key: "name",
        },
        {
          title: "重复率",
          slot: "rate",
        },
        {
          title: "业主方",
          key: "name",
        },
        {
          title: "施工方",
          key: "name",
        },
        {
          title: "项目地址",
          key: "name",
        },
        {
          title: "预计产值规模(万元)",
          key: "name",
        },
        {
          title: "发布时间",
          key: "name",
        },
      ],
      listData: [
        {
          name: "John Brown",
          age: 18,
          address: "New York No. 1 Lake Park",
        },
        {
          name: "Jim Green",
          age: 24,
          address: "London No. 1 Lake Park",
        },
        {
          name: "Joe Black",
          age: 30,
          address: "Sydney No. 1 Lake Park",
        },
        {
          name: "Jon Snow",
          age: 26,
          address: "Ottawa No. 2 Lake Park",
        },
      ],
    };
  },
  methods: {
    // 获取企业信息详情
    async getCompanyChangeHistoryDataData(companyId) {
      let params = {
        companyId,
      };
      let data = await GetCompanyChangeHistoryData(params);
    },
    // 变更记录
    changeLog() {
      this.$router.push({
        path: "/changeRecord",
      });
    },
    // 查看详情
    viewDetail(row) {},
  },
  created() {
    let { query } = this.$route;
    this.getCompanyChangeHistoryDataData(query.companyId);
  },
};
</script>

<style lang="less" scoped>
.page-main-content {
  padding: 20px;
  background: #fff;
  border-radius: 6px;
}
</style>
